;********************************
;* GEMUS SCRIPT FOR ATARI800    *
;*                              *
;* Version 2.0                  *
;*                              *
;* Created by K.C. January 2010 *
;*                              *
;********************************
;
; PLEASE SET YOUR EMULATOR PROPERTIES AS FOLLOWS:
;
; Emulator File: ATARI800.EXE
; Use Short Filenames: YES
; File Types: xex;com;cas;bin;rom;atr;bas
;
;
; This script was written for Atari800Win 2.1.0,
; but may work with other versions too.
;
; Emulator Website: http://atari800.sourceforge.net
;
; To run a game fullscreen, you can do that in 3 ways:
; - by setting key=value pair fullscreen=true
; - by selecting True Drive Emulation in the Version Tab
; - by specifying fullscreen=yes in a custom .CONF file
;
If Key_pilotrom CONTAINS(yes)
	Add_CLP( -cart pilot.rom )
End If

If GameType CONTAINS(xex||com||bas)
	Add_CLP(-run %gamepathfile%)
End If

If GameType CONTAINS(cas)
	If Key_basic CONTAINS(yes)
		If Key_tape CONTAINS(manual)
			Add_CLP( -tape %gamepathfile%)
		Else
			Add_CLP( -boottape %gamepathfile%)
		End If
	Else
		Add_CLP( -boottape -nobasic %gamepathfile%)
	End If
End If

If GameType CONTAINS(bin||rom)
	Add_CLP(-cart %gamepathfile%)
End If

If GameType CONTAINS(atr||xfd)
	Add_CLP(%gamepathfile%)
End If

If Key_fullscreen CONTAINS(true||on||yes||1)
	Add_CLP( -fullscreen)
ElseIf Key_fullscreen CONTAINS(false||off||no||0)
	Add_CLP( -windowed)
ElseIf Key_fullscreen CONTAINS(*)
	Show_Message(Invalid value for key=value pair FULLSCREEN entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
Else
	If TrueDriveEmu = YES
		Add_CLP( -fullscreen)
	Else
		Add_CLP( -windowed)
	End If
End If

Add_CLP( -config GB800.TXT)

;*****************************
; HARDWARE SETTINGS
;*****************************
Add_CLP( -rambo)

If Key_model CONTAINS(osa)
	Add_CLP( -a)
ElseIf Key_model CONTAINS(osb)
	Add_CLP( -b)
ElseIf Key_model CONTAINS(xl)
	Add_CLP( -xl)
ElseIf Key_model CONTAINS(xe)
	Add_CLP( -xe)
ElseIf Key_model CONTAINS(rambo)
	Add_CLP( -rambo)
ElseIf Key_model CONTAINS(false||off||no)
	Add_CLP( -rambo)
End If


If Key_emuos CONTAINS(true||on||yes||1)
	Add_CLP( -emuos)
ElseIf Key_emuos CONTAINS(false||off||no||0)
Else
	If Key_emuos CONTAINS(*)
		Show_Message(Invalid value for key=value pair EMUOS entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_blackbox CONTAINS(true||on||yes||1)
	Add_CLP( -bb)
ElseIf Key_blackbox CONTAINS(false||off||no||0)
Else
	If Key_blackbox CONTAINS(*)
		Show_Message(Invalid value for key=value pair BLACKBOX entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_mio CONTAINS(true||on||yes||1)
	Add_CLP( -mio)
ElseIf Key_mio CONTAINS(false||off||no||0)
Else
	If Key_mio CONTAINS(*)
		Show_Message(Invalid value for key=value pair MIO entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_basic CONTAINS(true||on||yes||1)
	Add_CLP( -basic)
ElseIf Key_basic CONTAINS(false||off||no||0)
	Add_CLP( -nobasic)
Else
	If Key_basic CONTAINS(*)
		Show_Message(Invalid value for key=value pair BASIC entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
	Add_CLP( -nobasic)
End If

If Key_siopatch CONTAINS(true||on||yes||1)
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_SIO_PATCH||1)
ElseIf Key_siopatch CONTAINS(false||off||no||0)
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_SIO_PATCH||0)
Else
	If Key_siopatch CONTAINS(*)
		Show_Message(Invalid value for key=value pair SIOPATCH entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default true is used.)
	End If
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_SIO_PATCH||1)
End If

If Key_hpatch CONTAINS(true||on||yes||1)
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_H_PATCH||1)
ElseIf Key_hpatch CONTAINS(false||off||no||0)
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_H_PATCH||0)
Else
	If Key_hpatch CONTAINS(*)
		Show_Message(Invalid value for key=value pair HPATCH entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_H_PATCH||0)
End If

If Key_ppatch CONTAINS(true||on||yes||1)
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_P_PATCH||1)
ElseIf Key_ppatch CONTAINS(false||off||no||0)
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_P_PATCH||0)
Else
	If Key_ppatch CONTAINS(*)
		Show_Message(Invalid value for key=value pair PPATCH entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_P_PATCH||0)
End If

If Key_hreadmode CONTAINS(readonly||ro)
	Set_CFG_Value(%emupath%\GB800.TXT||HD_READ_ONLY||1)
ElseIf Key_hreadmode CONTAINS(readwrite||rw)
	Set_CFG_Value(%emupath%\GB800.TXT||HD_READ_ONLY||0)
Else
	If Key_hreadmode CONTAINS(*)
		Show_Message(Invalid value for key=value pair HREADMODE entered.%crlfx2%Possible values are:%crlfx2%ro, readonly, rw, readwrite.%crlfx2%Default readonly is used.)
	End If
	Set_CFG_Value(%emupath%\GB800.TXT||HD_READ_ONLY||1)
End If

If Key_axlon CONTAINS(*)
	Add_CLP( -axlon %axlon_value%)
End If

If Key_axlon0f CONTAINS(true||on||yes||1)
	Add_CLP( -axlon0f)
ElseIf Key_axlon0f CONTAINS(false||off||no||0)
Else
	If Key_axlon0f CONTAINS(*)
		Show_Message(Invalid value for key=value pair EXLON0F entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_mosaic CONTAINS(*)
	Add_CLP( -mosaic %mosaic_value%)
End If



;*********************************
; EMULATOR SETTINGS
;*********************************

If Key_rtime CONTAINS(true||on||yes||1)
	Add_CLP( -rtime)
ElseIf Key_rtime CONTAINS(false||off||no||0)
	Add_CLP( -nortime)
Else
	If Key_rtime CONTAINS(*)
		Show_Message(Invalid value for key=value pair RTIME entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
	Add_CLP( -nortime)
End If

If Key_rdevice CONTAINS(*)
	Add_CLP( -rdevice %rdevice_value%)
End If

;*********************************
; SOUND SETTINGS
;*********************************

If Key_sound CONTAINS(true||on||yes||1)
	Add_CLP( -sound)
ElseIf Key_sound CONTAINS(false||off||no||0)
	Add_CLP( -nosound)
Else
	If Key_sound CONTAINS(*)
		Show_Message(Invalid value for key=value pair SOUND entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default true is used.)
	End If
	Add_CLP( -sound)
End If

If Key_wavonly CONTAINS(true||on||yes||1)
	Add_CLP( -wavonly)
ElseIf Key_wavonly CONTAINS(false||off||no||0)
Else
	If Key_wavonly CONTAINS(*)
		Show_Message(Invalid value for key=value pair WAVONLY entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_dsprate CONTAINS(*)
	Add_CLP( -dsprate %dsprate_value%)
End If

If Key_snddelay CONTAINS(*)
	Add_CLP( -snddelay %snddelay_value%)
End If

If Key_audio16 CONTAINS(true||on||yes||1)
	Add_CLP( -audio16)
ElseIf Key_audio16 CONTAINS(false||off||no||0)
Else
	If Key_audio16 CONTAINS(*)
		Show_Message(Invalid value for key=value pair AUDIO16 entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_quality CONTAINS(*)
	Add_CLP( -quality %quality_value%)
End If

If Key_newpokey CONTAINS(true||on||yes||1)
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_NEW_POKEY||1)
ElseIf Key_newpokey CONTAINS(false||off||no||0)
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_NEW_POKEY||0)
Else
	If Key_newpokey CONTAINS(*)
		Show_Message(Invalid value for key=value pair NEWPOKEY entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default true is used.)
	End If
	Set_CFG_Value(%emupath%\GB800.TXT||ENABLE_NEW_POKEY||1)
End If

If Key_speakersound CONTAINS(true||on||yes||1)
	Set_CFG_Value(%emupath%\GB800.TXT||SPEAKER_SOUND||1)
ElseIf Key_speakersound CONTAINS(false||off||no||0)
	Set_CFG_Value(%emupath%\GB800.TXT||SPEAKER_SOUND||0)
Else
	If Key_speakersound CONTAINS(*)
		Show_Message(Invalid value for key=value pair SPEAKERSOUND entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default true is used.)
	End If
	Set_CFG_Value(%emupath%\GB800.TXT||SPEAKER_SOUND||1)
End If

If Key_stereo CONTAINS(true||on||yes||1)
	Set_CFG_Value(%emupath%\GB800.TXT||STEREO_POKEY||1)
ElseIf Key_stereo CONTAINS(false||off||no||0)
	Set_CFG_Value(%emupath%\GB800.TXT||STEREO_POKEY||0)
Else
	If Key_stereo CONTAINS(*)
		Show_Message(Invalid value for key=value pair STEREO entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
	Set_CFG_Value(%emupath%\GB800.TXT||STEREO_POKEY||0)
End If


;************************************
; VIDEO SETTINGS
;************************************
If PalNTSC = PAL
	Set_CFG_Value(%emupath%\GB800.TXT||DEFAULT_TV_MODE||PAL)
ElseIf PalNTSC = NTSC
	Set_CFG_Value(%emupath%\GB800.TXT||DEFAULT_TV_MODE||NTSC)
Else
	Set_CFG_Value(%emupath%\GB800.TXT||DEFAULT_TV_MODE||PAL)
End If



If Key_refresh CONTAINS(1||2||3||4||5||6||7||8||9||10||11||12||13||14||15||16||17||18||19||20||21||22||23||24||25||26||27||28||29||30||31||32||33||34||35||36||37||38||39||40||41||42||43||44||45||46||47||48||49||50||51||52||53||54||55||56||57||58||59||60||61||62||63||64||65||66||67||68||69||70||71||72||73||74||75||76||77||78||79||80||81||82||83||84||85||86||87||88||89||90||91||92||93||94||95||96||97||98||99)
	Set_CFG_Value(%emupath%\GB800.TXT||SCREEN_REFRESH_RATIO||%refresh_value%)
Else
	If Key_refresh CONTAINS(*)
		Show_Message(Invalid value for key=value pair REFRESH entered.%crlfx2%Possible values are:%crlfx2%1 to 99.%crlfx2%Default 1 is used.)
	End If
	Set_CFG_Value(%emupath%\GB800.TXT||SCREEN_REFRESH_RATIO||1)
End If

If Key_width CONTAINS(*)
	Add_CLP( -width %width_value%)
End If

If Key_height CONTAINS(*)
	Add_CLP( -height %height_value%)
End If

If Key_rotate90 CONTAINS(true||on||yes||1)
	Add_CLP( -rotate90)
ElseIf Key_rotate90 CONTAINS(false||off||no||0)
Else
	If Key_rotate90 CONTAINS(*)
		Show_Message(Invalid value for key=value pair ROTATE90 entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_blt CONTAINS(true||on||yes||1)
	Add_CLP( -blt)
ElseIf Key_blt CONTAINS(false||off||no||0)
Else
	If Key_fullscreen CONTAINS(true||on||yes||1)
		If Key_blt CONTAINS(*)
			Show_Message(Invalid value for key=value pair BLT entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default true is used.)
		End If
		Add_CLP( -blt)
	Else

		If Key_blt CONTAINS(*)
			Show_Message(Invalid value for key=value pair BLT entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
		End If
	End If
End If

If Key_artif CONTAINS(0||1||2||3||4)
	Add_CLP( -artif %artif_value%)
Else
	If Key_artif CONTAINS(*)
		Show_Message(Invalid value for ARTIF entered.)
	End If
End If

If Key_paletten CONTAINS(*)
	Add_CLP( -paletten %paletten_value%)
End If

If Key_palettep CONTAINS(*)
	Add_CLP( -palettep %palettep_value%)
End If

If Key_blackn CONTAINS(*)
	Add_CLP( -blackn %blackn_value%)
End If

If Key_blackp CONTAINS(*)
	Add_CLP( -blackp %blackp_value%)
End If

If Key_whiten CONTAINS(*)
	Add_CLP( -whiten %whiten_value%)
End If

If Key_whitep CONTAINS(*)
	Add_CLP( -whitep %whitep_value%)
End If

If Key_colorsn CONTAINS(*)
	Add_CLP( -colorsn %colorsn_value%)
End If

If Key_colorsp CONTAINS(*)
	Add_CLP( -colorsp %colorsp_value%)
End If

If Key_genpaln CONTAINS(true||on||yes||1)
	Add_CLP( -genpaln)
ElseIf Key_genpaln CONTAINS(false||off||no||0)
Else
	If Key_genpaln CONTAINS(*)
		Show_Message(Invalid value for key=value pair GENPALN entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_genpalp CONTAINS(true||on||yes||1)
	Add_CLP( -genpalp)
ElseIf Key_genpalp CONTAINS(false||off||no||0)
Else
	If Key_genpalp CONTAINS(*)
		Show_Message(Invalid value for key=value pair GENPALP entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_colshiftn CONTAINS(*)
	If Key_genpaln CONTAINS(true||on||yes||1)
		Add_CLP( -colshiftn %colshiftn_value%)
	End If
End If

If Key_colshiftp CONTAINS(*)
	If Key_genpalp CONTAINS(true||on||yes||1)
		Add_CLP( -colshiftp %colshiftp_value%)
	End If
End If

;**********************************
; MISCELLANEOUS SETTINGS
;**********************************

If Key_showversion CONTAINS(true||on||yes||1)
	Add_CLP( -v)
ElseIf Key_showversion CONTAINS(false||off||no||0)
Else
	If Key_showversion CONTAINS(*)
		Show_Message(Invalid value for key=value pair SHOWVERSION entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_devbug CONTAINS(true||on||yes||1)
	Add_CLP( -devbug)
ElseIf Key_devbug CONTAINS(false||off||no||0)
Else
	If Key_devbug CONTAINS(*)
		Show_Message(Invalid value for key=value pair DEVBUG entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_record CONTAINS(*)
	Add_CLP( -record %record_value%)
End If

If Key_playback CONTAINS(*)
	Add_CLP( -playback %playback_value%)
End If

If Key_win32keys CONTAINS(true||on||yes||1)
	Add_CLP( -win32keys)
ElseIf Key_win32keys CONTAINS(false||off||no||0)
Else
	If Key_win32keys CONTAINS(*)
		Show_Message(Invalid value for key=value pair WIN32KEYS entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_screenshots CONTAINS(*)
	Add_CLP( -screenshots %screenshots_value%)
End If

If Key_showspeed CONTAINS(true||on||yes||1)
	Add_CLP( -showspeed)
ElseIf Key_showspeed CONTAINS(false||off||no||0)
Else
	If Key_showspeed CONTAINS(*)
		Show_Message(Invalid value for key=value pair SHOWSPEED entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

;**********************************
; PATH SETTINGS
;**********************************

If Key_osarom CONTAINS(*)
	Add_CLP( -osa_rom %osarom_value%)
End If

If Key_osbrom CONTAINS(*)
	Add_CLP( -osb_rom %osbrom_value%)
End If

If Key_xlxerom CONTAINS(*)
	Add_CLP( -xlxe_rom %xlxerom_value%)
End If

If Key_5200rom CONTAINS(*)
	Add_CLP( -5200_rom %5200rom_value%)
End If

If Key_basicrom CONTAINS(*)
	Add_CLP( -basic_rom %basicrom_value%)
End If

If Key_h1 CONTAINS(*)
	Set_CFG_Value(%emupath%\GB800.TXT||H1_DIR||%h1_value%)
Else
	Set_CFG_Value(%emupath%\GB800.TXT||H1_DIR|| )
End If

If Key_h2 CONTAINS(*)
	Set_CFG_Value(%emupath%\GB800.TXT||H2_DIR||%h2_value%)
Else
	Set_CFG_Value(%emupath%\GB800.TXT||H2_DIR|| )
End If

If Key_h3 CONTAINS(*)
	Set_CFG_Value(%emupath%\GB800.TXT||H3_DIR||%h3_value%)
Else
	Set_CFG_Value(%emupath%\GB800.TXT||H3_DIR|| )
End If

If Key_h4 CONTAINS(*)
	Set_CFG_Value(%emupath%\GB800.TXT||H4_DIR||%h4_value%)
Else
	Set_CFG_Value(%emupath%\GB800.TXT||H4_DIR|| )
End If

If Key_hpath CONTAINS(*)
	Add_CLP( -hpath %hpath_value%)
End If

;****************************************
; INPUT DEVICE SETTINGS
;****************************************

If Key_mouse CONTAINS(off||pad||touch||koala||pen||gun||amiga||st||trak||joy)
	Add_CLP( -mouse %mouse_value%)
Else
	If Key_mouse CONTAINS(*)
		Show_Message(Invalid value for key=value pair MOUSE entered.%crlfx2%Possible values are:%crlfx2%off, pad, touch, koala, pen, gun, amiga, st, trak, joy.%crlfx2%Default off is used.)
	End If
	Add_CLP( -mouse off)
End If

If Key_mouseport CONTAINS(1||2||3||4)
	Add_CLP( -mouseport %mouseport_value%)
Else
	If Key_mouseport CONTAINS(*)
		Show_Message(Invalid value for key=value pair MOUSEPORT entered.%crlfx2%Possible values are:%crlfx2%1, 2, 3, 4.%crlfx2%Default 1 is used.)
	End If
	If Key_mouse CONTAINS(pad||touch||koala||pen||gun||amiga||st||trak||joy)

		Add_CLP( -mouseport 1)
	End If
End If

If Key_mousespeed CONTAINS(1||2||3||4||5||6||7||8||9)
	Add_CLP( -mousespeed %mousespeed_value%)
Else
	If Key_mousespeed CONTAINS(*)
		Show_Message(Invalid value for key=value pair MOUSESPEED entered.%crlfx2%Possible values are:%crlfx2%1, 2, 3, 4, 5, 6, 7, 8, 9.%crlfx2%Default 3 is used.)
	End If
	If Key_mouse CONTAINS(pad||touch||koala||pen||gun||amiga||st||trak||joy)
		Add_CLP( -mousespeed 3)
	End If
End If

If Key_grabmouse CONTAINS(true||on||yes||1)
	Add_CLP( -grabmouse)
ElseIf Key_grabmouse CONTAINS(false||off||no||0)
Else
	If Key_grabmouse CONTAINS(*)
		Show_Message(Invalid value for key=value pair GRABMOUSE entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_directmouse CONTAINS(true||on||yes||1)
	Add_CLP( -directmouse)
ElseIf Key_directmouse CONTAINS(false||off||no||0)
Else
	If Key_directmouse CONTAINS(*)
		Show_Message(Invalid value for key=value pair DIRECTMOUSE entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_cx85 CONTAINS(*)
	Add_CLP( -cx85 %cx85_value%)
End If

If Key_multijoy CONTAINS(true||on||yes||1)
	Add_CLP( -multijoy)
ElseIf Key_multijoy CONTAINS(false||off||no||0)
Else
	If Key_multijoy CONTAINS(*)
		Show_Message(Invalid value for key=value pair MULTIJOY entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

If Key_joystick CONTAINS(true||on||yes||1)
ElseIf Key_joystick CONTAINS(false||off||no||0)
	Add_CLP( -nojoystick)
Else
	If Key_joystick CONTAINS(*)
		Show_Message(Invalid value for key=value pair JOYSTICK entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
End If

;----------------------------------------------------
; Show a window with comment or warning message
; if appropriate.
;----------------------------------------------------
If VersionComment CONTAINS(*not 100%*||*not working*||*doesn't work*)
	Show_Message(This game may not work properly.)
End If

If VersionComment CONTAINS(*ATTN:*||*NOTE:*||*ATTN!:*||*NOTE!:*)
	;point out that critical info is in the version comment
	Show_Message(Read this game's Version Comments for very important information/instructions.)
End If
If Key_message CONTAINS(*)
	Show_Message(%message_value%)
End If

If NumGameFiles > 1
	Show_Message(There is more than one image found for this game.%crlfx2%To mount the next image, press Alt+D in Atari800 and browse to %gbgamepath%.%crlfx2%Look here on in one of its subfolders for supported emulator file types.)
End If

;----------------------------------------------------
;View/edit the Command Line Parameters
;before launching the game
;----------------------------------------------------
If Key_testgame CONTAINS(true||on||yes||1)
	If Key_editclp CONTAINS(true||on||yes||1||false||off||no||0)
	ElseIf Key_editclp CONTAINS(*)
		Show_Message(Invalid value for key=value pair EDITCLP entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If
	If Key_testclp CONTAINS(true||on||yes||1||false||off||no||0)
	ElseIf Key_testclp CONTAINS(*)
		Show_Message(Invalid value for key=value pair TESTCLP entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If

	Run_Program(%emupath%\GB800.TXT||||nowait)
	Edit_CLP(Game will be started with the following Command Line Parameters)
	If Key_runemu CONTAINS(true||on||yes||1)
		Run_Emulator()
	ElseIf Key_runemu CONTAINS(false||off||no||0)
	Else
		If Key_runemu CONTAINS(*)
			Show_Message(Invalid value for key=value pair RUNEMU entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
		End If
	End If
Else
	If Key_testgame CONTAINS(false||off||no||0)
	ElseIf Key_testgame CONTAINS(*)
		Show_Message(Invalid value for key=value pair TESTGAME entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
	End If

	;----------------------------------------------------
	;View/edit the Command Line Parameters
	;before launching the game
	;----------------------------------------------------
	If Key_testclp CONTAINS(true||on||yes||1)
		Edit_CLP(Game will be started with the following Command Line Parameters)
	ElseIf Key_testclp CONTAINS(false||off||no||0)
		If Key_editclp CONTAINS(true||on||yes||1||false||off||no||0)
		ElseIf Key_editclp CONTAINS(*)
			Show_Message(Invalid value for key=value pair EDITCLP entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
		End If
	Else
		If Key_editclp CONTAINS(true||on||yes||1)
			Edit_CLP(Game will be started with the following Command Line Parameters)
		ElseIf Key_editclp CONTAINS(false||off||no||0)
		Else
			If Key_editclp CONTAINS(*)
				Show_Message(Invalid value for key=value pair EDITCLP entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
			End If
		End If
		If Key_testclp CONTAINS(*)
			Show_Message(Invalid value for key=value pair TESTCLP entered.%crlfx2%Possible values are:%crlfx2%true, false, on, off, yes, no, 1, 0.%crlfx2%Default false is used.)
		End If
	End If

	;---------------------------
	;Run the emulator

	;---------------------------

End If

If GameType CONTAINS(cas)
	If Key_tape CONTAINS(manual)

		Run_Emulator_Send_Keys("run@c:{enter}"||600)
	Else
		Run_Emulator()
	End If

End If
If GameType CONTAINS(atr||xex||bin||rom||com||bas||atx||xfd)
	Run_Emulator()
End If

